home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Telnet / NCSA / tn3270 2.4d7 source / NCSA⁄BYU TCP⁄IP / data.h < prev    next >
Text File  |  1991-07-09  |  4KB  |  127 lines

  1. /*
  2. *    data.h
  3. *   Declarations of global variables for TCP/IP libraries
  4. *
  5. ****************************************************************************
  6. *                                                                          *
  7. *                                                                          *
  8. *      NCSA Telnet                                                         *
  9. *      by Tim Krauskopf, VT100 by Gaige Paulsen, Tek by Aaron Contorer     *
  10. *                                                                          *
  11. *      National Center for Supercomputing Applications                     *
  12. *      152 Computing Applications Building                                 *
  13. *      605 E. Springfield Ave.                                             *
  14. *      Champaign, IL  61820                                                *
  15. *                                                                          *
  16. *    Copyright (c) 1987, Board of Trustees of the University of Illinois   *
  17. *                                                                          *
  18. ****************************************************************************
  19. *         
  20. */
  21.  
  22. /*
  23. *  Start with declarations that tell the difference between PC and other
  24. *  computers
  25. */
  26. #ifdef PC
  27. #include "pcdefs.h"
  28. #else
  29. #include "macdefs.h"
  30. #endif
  31.  
  32. #ifdef MASTERDEF
  33. unsigned char
  34.     us[] = 
  35. {"National Center for Supercomputing Applications -- TCP/IP by Tim Krauskopf"},
  36.     nnmyaddr[DADDLEN],        /*  my ethernet hardware address */
  37.     broadaddr[DADDLEN],        /*  the broadcast address */    
  38.     nnipnum[4],                /*  my ip number */
  39.     nnredir = 0,            /*  flag indicating need for redirect */
  40.     nnicmpsave[4],            /*  address for icmp redirect */
  41.     nnicmpnew[4],            /*  new gateway from icmp redirect */
  42.     nnmask[4] = {0,0,0,0},    /*  the default subnet mask */
  43.     nnamask[4] = {255,0,0,0},        /* class A mask */
  44.     nnbmask[4] = {255,255,0,0},     /* class B mask */
  45.     nncmask[4] = {255,255,255,0},    /* class C mask */
  46.     broadip[4] = {0xff,0xff,0xff,0xff};
  47.  
  48. int
  49.     nnipident                    /*  ident field of outgoing ip packets */
  50.             =1,    
  51.     nnefirst                    /* first entry in event q */
  52.             =0,
  53.     nnelast                        /* last entry in event q */
  54.             =0,
  55.     nnefree                        /* free list for event q */
  56.             =0,
  57.     nnemac                        /* Macintosh is using direct EtherTalk */
  58.             =0,
  59.     nndto                        /* dlayertimeout */
  60.             =DLAYTIMEOUT,
  61.     nnfromport                    /* can force a port number selection */
  62.             = 0,
  63.     nncredit = CREDIT,            /* limited window in some cases */
  64.     nnsegsize = MAXSEG;            /* maximum segment size  (intswapped) */
  65.  
  66. struct port *portlist[NPORTS];        /* allocate like iobuffers in UNIX */
  67. struct uport ulist;                    /* buffer for UDP */
  68. struct pseudotcp tcps;                /* for checksums */
  69. struct acache arpc[CACHELEN];        /* cache for hardware addresses */
  70. struct eq nnq[NEVENTS];                /* event queue */
  71.  
  72. ARPKT arp;
  73. DLAYER blankd;
  74. IPKT blankip;
  75. /*ICMPKT blankicmp;*/
  76.  
  77. #else
  78. extern unsigned char
  79.     nnmyaddr[DADDLEN],    /*  my ethernet hardware address */
  80.     broadaddr[DADDLEN]        /*  the broadcast address */,
  81.     broadip[4],
  82.     nnipnum[4],
  83.     nnredir,            /*  flag indicating need for redirect */
  84.     nnicmpsave[4],            /*  address for icmp redirect */
  85.     nnicmpnew[4],            /*  new gateway from icmp redirect */
  86.     nnmask[4],
  87.     nnamask[4],
  88.     nnbmask[4],
  89.     nncmask[4];
  90.  
  91. extern int
  92.     nnipident                /*  ident field of ip */,
  93.     nnefirst                    /* first entry in event q */,
  94.     nnelast                        /* last entry in event q */,
  95.     nndto                        /* dlayertimeout */,
  96.     nnefree,
  97.     nnemac,                        /* Macintosh is using direct EtherTalk */
  98.     nnfromport,                    /* can force a port number selection */
  99.     nncredit,
  100.     nnsegsize;            /* maximum segment size */
  101.  
  102. extern struct port *portlist[NPORTS];        /* allocate like iobuffers in UNIX */
  103. extern struct uport ulist;                    /* buffer for UDP */
  104. extern struct pseudotcp tcps;                /* for checksums */
  105. extern struct acache arpc[CACHELEN];        /* cache for hardware addresses */
  106. extern struct eq nnq[NEVENTS];                /* event queue */
  107.  
  108. extern ARPKT arp;
  109. extern DLAYER blankd;
  110. extern IPKT blankip;
  111. /*extern ICMPKT blankicmp;*/
  112.  
  113. #endif
  114.  
  115. /*
  116. *   defines for types for functions, global to everyone 
  117. */
  118. char *nbgets();
  119. uint8 *getdlayer(),*netdlayer();
  120. char *neterrstring();            /* some more static data for driver */
  121.  
  122. /*
  123. *   defines of constants and macros that everyone needs to know
  124. */
  125.  
  126. #define nnerror(A)  netposterr(A)
  127.